#!/bin/bash

set -u

function cmd_rootfs()
{
	echo -e "\n[DEBUG] ${FUNCNAME} $@"

	local rk_rootfs_tool=$(conf1_get ${L4T_TOP}/${JETSON_CONF}.conf "RK_ROOTFS_TOOL")
	local rk_rootfs_tool_file=$(abs_path "${CUR_TOP}/../l4t_rootfs_tools/${rk_rootfs_tool}")
	echo -e "[DEBUG] rk_rootfs_tool_file=${rk_rootfs_tool_file}"
	if [[ -f ${rk_rootfs_tool_file} ]]; then
		cd $(dirname ${rk_rootfs_tool_file})
		source ${rk_rootfs_tool_file} $@
		cd - &> /dev/null
	else
		echo -e "[ERROR] The rk_rootfs_tool_file not found."
	fi
}
